package abstractfactory;

import abstractfactory.factory.AbstractFactory;
import abstractfactory.factory.FactoryProducer;
import abstractfactory.interf.Color;
import abstractfactory.interf.Shape;

/**
 * @ClassName Main
 * @Description TODO
 * @Author 马继斌
 * @Email 1423553596@qq.com
 * @Date 18-8-29 上午5:18
 **/
public class Main {
    public static void main(String[] args){
        AbstractFactory colorFactory = FactoryProducer.getFactory("COLOR");
        AbstractFactory shapeFactory = FactoryProducer.getFactory("SHAPE");

        Color red = colorFactory.getColor("RED");
        Shape circle = shapeFactory.getShape("CIRCLE");
        red.fill();
        circle.draw();
    }

}
